import {searchList} from '@/api'
const state = {
    goodsListInfo:{}
}
const mutations ={
    RESOVE_GOODSLIST(state,goodsListInfo){
        state.goodsListInfo = goodsListInfo
    }
}
const actions ={
    async getGoodsList ({commit},searchParams){
        const result =await searchList(searchParams)
        commit('RESOVE_GOODSLIST',result.data)
    }
}
const getters = {
    attrsList(state){
        return state.goodsListInfo.attrsList
    },
    goodsList(state){
        return state.goodsListInfo.goodsList
    },
    trademarkList(state){
        return state.goodsListInfo.trademarkList
    },
}
export default {
    state,
    mutations,
    actions,
    getters
}